package cn.wowjoy.pda.android_pharmacy.mvvm.presenter;

import cn.wowjoy.pda.android_pharmacy.common.core.BasePresenter;
import cn.wowjoy.pda.android_pharmacy.common.widget.MyToast;
import cn.wowjoy.pda.android_pharmacy.mvvm.vm.InHospitalCheckHandDetailViewModel;

/**
 * Created by sinyo on 2017/8/7.
 */

public class InHospitalCheckHandDetailPresenter extends BasePresenter<InHospitalCheckHandDetailViewModel> {
    @Override
    public void onCreatePresenter() {

    }
    public boolean  check(String should, String fact){
        int s = 0;
        int f = 0;
        if(should != null && fact !=null){
            if(should.length() !=0 && should.length() <9 &&  fact.length() != 0 && fact.length()<9){
                s = Integer.parseInt(should);
                f = Integer.parseInt(fact);
            }else {
                new MyToast(context).showinfo("请核对数量");
                return false;
            }
        }
        if(s != f){
            new MyToast(context).showinfo("请核对数量");
            return false;
        }
        return true;
    }
}
